package ua.yandex.skipasssystem.skipass;

import ua.yandex.skipasssystem.skipass.validators.PartOfDayUnlimSkiPassValidator;
import ua.yandex.skipasssystem.skipass.validators.Validator;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.EnumMap;

public class PartOfDayUnlimSkiPass extends WithDaysOfWorkSkiPass
        implements PartOfDayInterface {
    private LocalTime fromTime;
    private LocalTime toTime;

    PartOfDayUnlimSkiPass(long id,
                          LocalDate fromDate,
                          LocalDate toDate,
                          LocalTime fromTime,
                          LocalTime toTime,
                          EnumMap<DayOfWeek, Boolean> daysOfWorking) {
        super(id, fromDate, toDate, daysOfWorking);
        this.fromTime = fromTime;
        this.toTime = toTime;
    }


    public LocalTime getFromTime() {
        return fromTime;
    }

    public LocalTime getToTime() {
        return toTime;
    }

    @Override
    public Validator getValidator() {
        return PartOfDayUnlimSkiPassValidator.getValidator();
    }
}